<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script> -->
    <script src="./js/axios.min.js"></script>
    <script>
        // const res = axios({
        //     url:'http://hmajax.itheima.net/api/province'
        // }).then((result)=>{
        //     const sheng = result.data.list.map(item=> `<div>${item}</div>`)
        //     document.body.innerHTML = sheng.join('')
        // })
        const res = axios({
            url:'http://hmajax.itheima.net/api/province',
        }).then( item => {
            console.log(item)
            const province = item.data.list.map(item => `<p>${item}</p>`)
            document.body.innerHTML = province.join('')
        })
    </script>
</body>
</html>